import request from '@/utils/request'

// 查询项目代建清单列表
export function list(query) {
  return request({
    url: '/project/agency/boq/list',
    method: 'get',
    params: query
  })
}

// 查询清单树形列表
export function getTreeList(query) {
  return request({
    url: '/project/agency/boq/getTreeList',
    method: 'get',
    params: query
  })
}

// 查询清单列表--不包含子项
export function getTreeListExcludeChild(query) {
  return request({
    url: '/project/agency/boq/getTreeListExcludeChild',
    method: 'get',
    params: query
  })
}

// 查询项目代建清单详细
export function getInfo(id) {
  return request({
    url: '/project/agency/boq/' + id,
    method: 'get'
  })
}

// 新增项目代建清单
export function add(data) {
  return request({
    url: '/project/agency/boq',
    method: 'post',
    data: data
  })
}

// 同步系统代建清单
export function sync(projectId) {
  return request({
    url: '/project/agency/boq/sync/' + projectId,
    method: 'get'
  })
}

// 修改项目代建清单
export function update(data) {
  return request({
    url: '/project/agency/boq',
    method: 'put',
    data: data
  })
}

// 删除项目代建清单
export function del(id) {
  return request({
    url: '/project/agency/boq/' + id,
    method: 'delete'
  })
}
